import time,signal
import test,os


def sig_hand(signum, frame):
    program.konec()
if os.name=="posix":
    default_port="/dev/ttyrfcomm1"
if os.name=="nt":
    default_port=1
program = test.test()

signal.signal(signal.SIGINT, sig_hand)
signal.signal(signal.SIGTERM, sig_hand)


program.start()
program.rinput()
time.sleep(2)
program.konec()
